package sicnu.cs.ich.api.common;

import org.apache.ibatis.type.IntegerTypeHandler;

/**
 * 常量
 *
 * @author CaiKe
 */
public class Constants {

    public static final String USERNAME_TYPE = "1";
    public static final String EMAIL_TYPE = "2";
    public static final String MOBILE_TYPE = "3";
    public static final String RESET_PASSWORD = "123456abc";
    public static final String REDIS_AES_KEY = "AES::key";

    /**
     * 登录字段
     */
    public static final String LOGIN_NAME = "username";
    public static final String LOGIN_PASSWORD = "password";

    /**
     * 重置邮箱，每日请求上限和请求间隔
     */
    public static final Integer EMAIL_RESET_DAY_LIMIT = 5;
    public static final Integer EMAIL_RESET_INTERVAL = 1;

    /**
     * maximum size of hit-ich stored
     */
    public static final int MAX_ICH_COUNT = 30;

    /**
     * 非遗默认过期时间
     */
    public static final int EXPIRE_ICH_TIME = 30 * 60;


    /**
     * ****************************************************************************************************
     *                                         Redis 相关键值对
     * ****************************************************************************************************
     */
    public static final String REDIS_ICH = "ich::id::" ;
    public static final String REDIS_RANK_ICH_PROVINCE = "rank::province:";
    public static final String REDIS_RANK_ICH_HIT = "rank::ich::";
    public static final String REDIS_ICH_PROVINCE_INFO = "ich::province::info";
    public static final String REDIS_ICH_LIKE = "ich::like::id::";
    public static final String REDIS_RANK_ICH_PROVINCE_TYPE = "rank::province::type::";
    public static final String REDIS_RANK_ACTIVITY_ACTIVITY = "rank::activity::activity";
    public static final String REDIS_RANK_ACTIVITY_CALL = "rank::activity::call";
    public static final String REDIS_RANK_ACTIVITY_HIT = "rank::activity";


    // 邮箱注册时
    public static final String REDIS_EMAIL_CODE = "register::code:";
    // 邮箱登录时，暂存的验证码
    public static final String REDIS_EMAIL_LOGIN_CODE_KEY = "email_login::code::";

    /**
     *  初始化map中活动的数量
     */
    public static final Integer ACTIVITY_INIT_NUM= 50;
    /**
     * 活动排行榜的大小
     */
    public static final Integer ACTIVITY_RANK_SIZE= 20;


}
